import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'colors.dart';

class StylesUtils {
  StylesUtils._();

  static const String defaultFamily = 'PingFang_SC_Regular';

  static double get fontSize8 {
    return 8.sp;
  }

  static double get fontSize9 {
    return 9.sp;
  }

  static double get fontSize10 {
    return 10.sp;
  }

  static double get fontSize11 {
    return 11.sp;
  }

  static double get fontSize12 {
    return 12.sp;
  }

  static double get fontSize13 {
    return 13.sp;
  }

  static double get defaultFontSize {
    return 14.sp;
  }

  static double get fontSize15 {
    return 15.sp;
  }

  static double get fontSize16 {
    return 16.sp;
  }

  static double get fontSize17 {
    return 17.sp;
  }

  static double get fontSize18 {
    return 18.sp;
  }

  static double get fontSize20 {
    return 20.sp;
  }

  static double get fontSize22 {
    return 22.sp;
  }

  static double get fontSize24 {
    return 24.sp;
  }

  static double get fontSize28 {
    return 28.sp;
  }

  static double get fontSize30 {
    return 30.sp;
  }

  static double get fontSize32 {
    return 32.sp;
  }

  static double get fontSize36 {
    return 36.sp;
  }

  static double get fontSize48 {
    return 48.sp;
  }

  static double get fontSize72 {
    return 72.sp;
  }

  static TextStyle defaultTextStyle(
      {double? fontSize,
      double lineHeight = 1.0,
      String fontFamily = defaultFamily,
      FontWeight fontWeight = FontWeight.normal}) {
    return TextStyle(
        fontSize: fontSize ?? defaultFontSize,
        fontFamily: fontFamily,
        fontWeight: FontWeight.normal,
        height: lineHeight,
        fontStyle: FontStyle.normal,
        color: Colors.white);
  }

  static TextStyle customTextStyle(
      {double? fontSize,
      FontWeight fontWeight = FontWeight.normal,
      String color = ColorsUtils.colorFfff,
      String fontFamily = defaultFamily,
      List<Shadow>? shadows,
      TextDecoration? decoration,
      Color? decorationColor,
      TextDecorationStyle? decorationStyle,
      double? decorationThickness,
      double lineHeight = 1.0}) {
    return TextStyle(
      fontSize: fontSize ?? defaultFontSize,
      fontFamily: fontFamily,
      fontWeight: FontWeight.normal,
      fontStyle: FontStyle.normal,
      shadows: shadows,
      color: ColorsUtils.parseColorFromHexString(color),
      height: lineHeight,
      decoration: decoration,
      decorationColor: decorationColor,
      decorationStyle: decorationStyle,
      decorationThickness: decorationThickness,
    );
  }

  static TextStyle textStyle(
      {double? fontSize,
      FontWeight fontWeight = FontWeight.normal,
      Color color = Colors.white,
      String fontFamily = defaultFamily,
      TextDecoration? decoration,
      TextDecorationStyle? decorationStyle,
      Color? decorationColor,
      double? decorationThickness,
      double lineHeight = 1.0}) {
    return TextStyle(
        fontSize: fontSize ?? defaultFontSize,
        fontFamily: fontFamily,
        fontWeight: FontWeight.normal,
        color: color,
        fontStyle: FontStyle.normal,
        decoration: decoration,
        decorationColor: decorationColor,
        decorationStyle: decorationStyle,
        decorationThickness: decorationThickness,
        height: lineHeight);
  }
}
